<template>
  <div>
    <!-- 列表 -->
    <div class="platform-table">
      <el-table :data="tableData" border style="width: 100%">
        <el-table-column type="selection" width="55" align="center"></el-table-column>
        <el-table-column fixed prop="title" label="文章标题" min-width="200" align="center"></el-table-column>
        <el-table-column label="显示状态" min-width="50" align="center">
          <template slot-scope="scope">
            <el-switch
              v-model="state"
              active-color="#13ce66"
              inactive-color="#DCDFE6"
              :active-value="1"
              :inactive-value="0"
              @change="apiState($event,scope.row)"
            ></el-switch>
          </template>
        </el-table-column>
        <el-table-column prop="classification" label="文章分类" min-width="50" align="center"></el-table-column>
        <el-table-column prop="amount" label="访问量" align="center"></el-table-column>
        <el-table-column prop="time" label="发表时间" min-width="100" align="center"></el-table-column>
        <el-table-column fixed="right" label="操作" width="240">
          <template>
            <el-button type="text" size="small" class="start-btn">查看</el-button>
            <el-button type="text" size="small" class="upt-btn">编辑</el-button>
            <el-button type="text" size="small" class="del-btn">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      input: "",
      search: "",
      currentPage: 1,
      tableData: [
        {
          title: "测试 - 文章标题",
          state: 1,
          classification: "告示",
          amount: "22",
          time: "2020-02-02",
        },
      ],
    };
  },
};
</script>
